#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdbool.h>
#include<string.h>
bool isCircularSentence(char* sentence) {
    int len = strlen(sentence);
    if (sentence[len - 1] != sentence[0])
        return false;
    for (int i = 0; i < len; i++)
    {
        if (sentence[i] == ' ' && sentence[i + 1] != sentence[i - 1])
            return false;
    }
    return true;
}

int main()
{
    char arr[] = {"leetcode exercises sound delightful"};
    bool is = isCircularSentence(arr);
    printf("%d", is);
	return 0;
}